<?php
namespace app\controller;

use app\BaseController;

use think\facade\View;

class Index extends BaseController
{
   
   
    public function index()
    {
        // 模板输出并变量赋值
        return View::fetch('index', [
            'name'  => 'ThinkPHP',
            'email' => 'thinkphp@qq.com'
        ]);
    }

      public function index1()
    {
        // 不带任何参数 自动定位当前操作的模板文件
        return View::fetch('index', [
            'name'  => 'ThinkPHP',
            'email' => 'thinkphp@qq.com'
        ]);
    }

    public function hello($name = 'ThinkPHP6')
    {
        return 'hello,' . $name;
    }
}
